package com.example.natatorium_management.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;

import com.example.natatorium_management.entity.Order;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrderMapper  extends BaseMapper<Order> {
    IPage<Order> queryPage(IPage<Order> page);

    int addOrder(Order order);

    int updateOrder(Order order);

    IPage<Order> findOrderByCustomerName(IPage<Order> page,@Param("customerName") String customerName);

    IPage<Order> findOrderByPhone(IPage<Order> page,@Param("phone") Long phone);

    IPage<Order> findOrderByMemberName(IPage<Order> page,@Param("memberName") String memberName);

    List<Integer> selectAllGoods(Long orderId);

}
